<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>mini vue</title>
</head>
<body>
    <div id='app'>
        <h1>差值表达式</h1>
        <h3>{{ msg }}</h3>
        <h3>{{ count }}</h3>
        <h1>v-text</h1>
        <h3 v-text="msg"></h3>
        <h1>v-model</h1>
        <input type="text" v-model="msg">
        <input type="text" v-model="count">
        <h1>v-html</h1>
        <div v-html="rich"></div>
        <h1>v-on</h1>
        <button v-on:click="alert">alert</button>
        <input type="text" placeholder="请输入" v-on:keyup="keyup"> 
        <!-- <button v-on="{ mouseenter: mouseenter, mousedown: mousedown }">obj</button> -->
    </div>
    <script src="./js/dep.js"></script>
    <script src="./js/watch.js"></script>
    <script src='./js/observer.js'></script>
    <script src='./js/compiler.js'></script>
    <script src="./js/vue.js"></script>
    <!-- <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> -->
    <script>
        let vm = new Vue({
            el: '#app',
            data: {
                msg: 'hello',
                count: 10,
                rich: '<span style="font-weight: bold">rich</span>'
            },
            methods: {
                alert () {
                    alert('v-on')
                },
                mousedown () {
                    alert('mousedown')
                },
                mouseenter() {
                    console.log(111)
                }
            }
        })
    </script>
</body>
</html>